import 'package:library_base/entities/generated/json/base/json_field.dart';
import 'dart:convert';

import 'package:library_base/entities/generated/json/lazy_page_entity.g.dart';

@JsonSerializable()
class LazyPageEntity<T> {
  late List<T> list;

  late int total;
  late int size;
  late int current;
  late int pages;

  LazyPageEntity();

  factory LazyPageEntity.fromJson(Map<String, dynamic> json) => $LazyPageEntityFromJson(json);

  Map<String, dynamic> toJson() => $LazyPageEntityToJson(this);

  @override
  String toString() => json.encode(this);
}
